package com.syb.dao;

import java.util.List;

import com.syb.entity.function.SysResource;
import com.syb.util.PageResults;

public interface ResourcesDao {
	
	/**
	 * @see查询资源列表
	 * @param page
	 * @return
	 * @throws Exception
	 */
	public List<SysResource> findResourcesList(PageResults<SysResource> page) throws Exception;
	
	public int findResourcesCount(PageResults<SysResource> page)throws Exception;
	
	/**
	 * @see 查询出所有的顶级菜单
	 * @return
	 * @throws Exception
	 */
	public List<SysResource> findResorcesDing() throws Exception;
	
	/**
	 * @see 新增资源
	 * @param sys
	 * @return
	 */
	public void insertResource(SysResource sys) throws Exception;
	
	/**
	 * @see 删除资源
	 * @param sys
	 * @throws Exception
	 */
	public void delResource(SysResource sys) throws Exception;
	
	/**
	 * @see 更新资源
	 * @param sys
	 * @throws Exception
	 */
	public void updateResource(SysResource sys) throws Exception;
	
	/**
	 * @see 根据名字 查询资源是否存在
	 * @param name
	 * @return
	 * @throws Exception
	 */
	public List<SysResource> findResourceByName(SysResource name) throws Exception;
	
	/**
	 * 查询出所有的资源
	 * @return
	 * @throws Exception
	 */
	public List<SysResource> findResourceList()throws Exception;

}
